
<!--
*Author：富行天下团队
 *
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/system/Sys_Role.js此处编写
 -->
<template>
  <div>
    <view-grid :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormFileds="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormFileds="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
  </div>
</template>

<script>
import extend from "@/extension/system/Roles.js";
import ViewGrid from "@/components/basic/ViewGrid.vue";
var vueParam = {
  components: {
    ViewGrid
  },
  data () {
    return {
      table: {
        key: 'Role_Id',
        footer: "Foots",
        cnName: '角色管理',
        name: 'Roles',
        url: "/Roles/",
        sortName: "Role_Id"
      },
      extend: extend,
      editFormFields: {"ParentId":[],"RoleName":"","DeptName":"","Enable":"","Creator":"",issecondDistri:"","CreateDate":"","Modifier":"","ModifyDate":"","createID":"","modifyID":"",Dept_Id: ''},
      editFormOptions: [[{"dataKey":"tree_roles","data":[],"title":"父级ID","required":true,"field":"ParentId","type":"cascader"},
                               {"title":"角色名称","required":true,"field":"RoleName"},
                               ],
                               [{"dataKey":"enable","data":[],"title":"是否二级分销商专用","field":"issecondDistri","type":"switch"}],
                              [{"title":"商户名称","field":"Dept_Id","dataKey":"Merchants","data":[],"type":"select","required":true},
                               {"dataKey":"enable","data":[],"title":"是否启用","field":"Enable","type":"switch"}],
                              [{"title":"创建人","field":"Creator","disabled":true},
                               {"title":"创建时间","field":"CreateDate","disabled":true,"type":"datetime"}],
                              [{"title":"修改人","field":"Modifier","disabled":true},
                               {"title":"修改时间","field":"ModifyDate","disabled":true}]],
       searchFormFields : {"RoleName":"","DeptName":"","Enable":"","CreateDate":"","ModifyDate":""},
       searchFormOptions : [[{"title":"角色名称","field":"RoleName","type":"text"},{"title":"部门名称","field":"DeptName","type":"text"},{"dataKey":"enable","data":[],"title":"是否启用","field":"Enable","type":"select"}],[{"title":"创建时间","field":"CreateDate","type":"datetime"},{"title":"修改时间","field":"ModifyDate","type":"datetime"}]],
       columns: [{field:'Role_Id',title:'角色ID',type:'int',hidden:true,width:200,readonly:true,require:true,align:'left',sortable:true},
                       {field:'ParentId',title:'父级ID',type:'int',hidden:true,bind:{ key:'tree_roles',data:[]},width:200,require:true,align:'left'},
                       {field:'RoleName',title:'角色名称',type:'string',link:true,width:220,require:true,align:'left'},
                       {field:'Dept_Id',title:'商户名称',type:'int',bind:{ key:'Merchants',data:[]},width:220,require:true,align:'left'},
                       {field:'DeptName',title:'商户名称',type:'string',hidden:true,width:220,align:'left'},
                       {field:'Enable',title:'是否启用',type:'byte',bind:{ key:'enable',data:[]},width:90,align:'left'},
                       {field:'OrderNo',title:'排序',type:'int',width:90,hidden:true,align:'left'},
                       {field:'Creator',title:'创建人',type:'string',width:120,readonly:true,align:'left'},
                       {field:'CreateDate',title:'创建时间',type:'datetime',width:220,readonly:true,align:'left',sortable:true},
                       {field:'Modifier',title:'修改人',type:'string',width:120,readonly:true,align:'left'},
                       {field:'ModifyDate',title:'修改时间',type:'datetime',width:220,readonly:true,align:'left',sortable:true}],
      detail: {
        cnName: "#detailCnName",
        columns: [],
        sortName: "",
        key: ""
      }
    };
  }
};
export default vueParam;
</script>
